<!--
//****************************************************************/
//Creation History
// Company: GZ office
// NAME:    CostCenter.jsp
// TITLE:   Cost Center Column Accessibility Maintenance 
// BY:      Oscar Bai
// DATE:    03/03/2003
//******************************************************************/
//Modification History
//******************************************************************/
//******************************************************************/
-->

<%@ include file="../header.jsp" %>
<%@ page import="admin.system.costcenter.*" %>
<!--CRLOG 1347-->
<%@ page import="admin.options.*" %>

<script language=javascript>
 function formValidation() {
    var d1 = fm.cost_center_id;
    var d2 = fm.cost_center_name;
    var d3 = fm.cost_center_des;

    if (isNull(d1,"COST CENTER ID")||isNull(d2,"COST CENTER Name")||isNull(d3,"COST CENTER Description"))  {
       return false;
    }

    return true;
 }
<%
    CostCenterBean costCenter = (CostCenterBean)request.getAttribute("costCenters");
    if (costCenter==null){
       costCenter = new CostCenter();
       System.out.println("New");
    }
       System.out.println("Old");

    DivisionOptions divopt = new  DivisionOptions() ;
%>
</script>
<body>
<h2>Cost Center Maintenance</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/admin.system.costcenter.CostCenterServlet >
<input type=hidden name=formAction value=<%=formAction%> >
<table cols=2 border=0 >
<tr>
  <td>Cost Center ID</td>
  <td><input type=text name=cost_center_id value="<%=costCenter.getCost_Center_id()%>" maxlength=10 <%=readOnly%> ></td>
</tr>
<tr>
  <td>Cost Center Name</td>
  <td><input type=text name=cost_center_name value="<%=costCenter.getCost_Center_name()%>" maxlength=50></td>
</tr>
<tr>
  <td>Cost Center Description</td>
  <td><input type=text name=cost_center_des value="<%=costCenter.getCost_Center_des()%>" maxlength=100></td>
</tr>
<!--CRLOG 1347-->
<tr>
  <td>Division</td>
  <td><select name=division_id><%=divopt.getOptions(costCenter.getDivision_id())%></select></td>
</tr>
<!--END-->
</table>
<hr>
<p>
  <INPUT type=button value=Save onclick="save()" >
  <INPUT type=button value=Delete  onclick="deleteRecord()"  >
  <INPUT type=reset  value=Cancel >
</p>
</form>
<%@ include file="../footer.jsp" %>
</body>
</body>
</html>

